import fetch from 'src/fetch'
import * as shopActivityUrl from '../constant/shopActivity'

export const list = (params) => {
  return fetch({
    url: shopActivityUrl.url,
    params
  })
}

export const get = (id) => {
  return fetch({
    url: shopActivityUrl.url+"/"+id,
  })
} 

export const set = (data) => {
  return fetch({
    url: shopActivityUrl.url,
    method: 'post',
    data
  })
} 
  
export const del = (id) => {
  return fetch({
    url: shopActivityUrl.url+"/"+id,
    method: 'delete'
  })
} 

export const enable = (shopActivityId, isEnable) => {
  return fetch({
    url: shopActivityUrl.url+"/"+shopActivityId+"/"+isEnable,
    method: 'put'
  })
} 